package main

import "fmt"

// 管道
type Cat struct {
	Name string
	Age  int
}

func main() {
	allChan := make(chan interface{}, 3)
	allChan <- 10
	allChan <- "tom"
	allChan <- Cat{
		Name: "as",
		Age:  10,
	}
	<-allChan
	<-allChan
	newCat := <-allChan
	// 类型断言
	a := newCat.(Cat)
	fmt.Println(a.Name)
}
